package com.hbnu.service.impl;

import com.hbnu.dao.DoorsDao;
import com.hbnu.pojo.Door;
import com.hbnu.service.DoorsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Service
public class DoorsServiceImpl implements DoorsService {
    @Resource
    private DoorsDao doorsDao;
    @Override
    public List<Door> getDoors() {
        return doorsDao.getDoors();
    }

    @Override
    public Door getDoorById(int id) {
        return doorsDao.getDoorById(id);
    }

    @Override
    public int deleteDoorById(int id) {
        return doorsDao.deleteDoor(id);
    }

    @Override
    public int addDoor(Door door) {
        return doorsDao.addDoor(door);
    }

    @Override
    public int updateDoor(Door door) {
        return doorsDao.updateDoor(door);
    }


}
